function gamma_summary()

global VOLTAGE
% dbstack
nmax = size(VOLTAGE, 1);
j=1;
s.f = [];
s.p = [];
ref = [];
nref = 8;
for i = 1:nmax
    [m rs] = gamma_measure(i, ref);
    if(~isempty(m))
        me(j) = m;
        t(j) = i;
        if(j == 1)
            s.f = rs.Frequencies;
            s.p = rs.Data;
            ref.f = s.f;
            ref.sp = s.p;
        else
            s.p = s.p + rs.Data;
            if(j <= nref)
                ref.sp = s.p/j;
            end;
        end;
        j = j + 1;
    end;

end;
avespec = s.p/j;
newfigure('gammasummary');
subplot(2,1,1);
plot(t, [me.base], 'k-');
hold on;
plot(t, [me.gamma], 'b-');
plot(t, [me.theta], 'r-');
subplot(2,1,2);
plot(s.f, avespec);
